<template>
  <div>
    <div class="box">

      <div class="big">
        <div class="top">
          <el-input v-model="input" 
            placeholder="请输入内容" 
            class="searchClass"
            suffix-icon="el-icon-search"></el-input>
        </div>
        <div class="under">
          <ul class="ul1">
            <li v-for = "(item, index) in messages" :key="index" class="li1" >
              
              <a style="text-decoration: none; color: #808080"  href="123" > {{item.txt}}</a>

            </li>
          </ul>
        </div>
      </div>
    </div>
        <div class="Popular_articles">
          <h4>热门文章</h4>
          <ul>
            <li><span class="span_1">1</span><a href="#" >模板分享</a></li>
            <li><span class="span_2">2</span><a href="#" >新增QQ音乐与网易云音乐搜索</a></li>
            <li><span class="span_3">3</span><a href="#" >我的第一个C/S项目</a></li>
            <li><span>4</span><a href="#"  >2018最新版QQ音乐api</a></li>
            <li><span>5</span><a href="#" >MUI上拉加载和下拉刷新出现双....</a></li>
            <li><span>6</span><a href="#" >MUI动态加载组件</a></li>
            <li><span>7</span><a href="#" >逆水寒</a></li>
            <li><span>8</span><a href="#" >序列</a></li>
        </ul>
      </div>
    
  </div>
</template>

<script>
export default {
 name: 'sidebar',
  data() {
    return{
      messages: [{
        txt:"全部文章"
      }, {
        txt:"个人日记"
      }, {
        txt:"HTML4&CSS3"
      }, {
        txt:"JavaScript"
      }, {
        txt:"ASP.NET MVC"
      }, {
        txt:"其他"
      }],
      input: ''
    }
  }
}
</script>

<style scoped>
  .box {
    height: 500px;
    width: 100%;
    background-color: #fff;
    margin-top: 90px;
  }

  .searchClass{
    margin:22px 0px 22px 0px; 
    height: 40px;
    width: 80%;
  }
  
  .big{
      width: 100%;
      height:300px;
  }

  .top{
      width:100%;
      height:80px;
      background-color: #808080;
  }

  .under{
      width:100%;
      height:230px;
      display: flex;
  }

  .ul1{
    width: 100%;
    list-style: none;
    font-size: 12px;
    margin: 20px auto 0 auto;
    line-height: 10px;
    text-align: left;
    padding: 0;
  }

  .li1{
    padding-left: 40px;
    line-height: 40px;
    text-align: left;
    /* background-color: #ccc; */
    height: 40px;
    border-bottom: 1px solid #fbfcfb;

    
  }

  .under ul li:hover {
    background-color: #ccc;
    border-right: 10px solid #222;
    border-radius:0 0% 3% 0%;
  }

  * {
      margin: 0px;
      padding: 0px;
    }
  .Popular_articles{
    text-align: left;
      /* margin: 0 auto; */
      /* width: 100%; */
      height: 358px;
      background-color: #fff;
    }
  .Popular_articles h4{
      width: 230px;
      margin: 20px 0 0 33px;
      padding-top: 20px;
      padding-bottom: 10px;
      color: black;
      font-size: 18px;
      font-weight: 400;
      border-bottom:1px solid gainsboro;
      text-indent: 0.5em;
    }
  .Popular_articles ul{
      margin-left: 26px;
      list-style: none;
    }
  .Popular_articles li{
      height: 28px;
      padding-top: 8px;
    }
  span{
      float: left;
      display: block;
      width: 22px;
      height: 22px;
      background-color: #edefee;
      /* border-radius: 100px; */
      color: black;
      font-weight: 400;
      border-radius: 50%;
      font-size: 14px;
      text-align: center;
      line-height: 25px;
      margin-right: 10px;
    }
  .span_1{
      color: white;
      background-color:#e24d46;
    }
  .span_2{
      color: white;
      background-color:#2ea7e0;
    }
  .span_3{
      color: white;
      background-color:#6bc30d;
    }
  .Popular_articles ul li a{
      text-align: left;
      text-decoration: none;
      color: #888987;
      font-size: 14px;
    }
  .Popular_articles ul li a:hover{
      color:#6bc30d;
      text-decoration:underline;
        }
</style>
